package com.cyy.daijia.driver.client.fallback;

import com.cyy.daijia.common.result.Result;
import com.cyy.daijia.driver.client.DriverInfoFeignClient;
import com.cyy.daijia.model.entity.driver.DriverSet;
import com.cyy.daijia.model.form.driver.DriverFaceModelForm;
import com.cyy.daijia.model.form.driver.UpdateDriverAuthInfoForm;
import com.cyy.daijia.model.vo.driver.DriverAuthInfoVo;
import com.cyy.daijia.model.vo.driver.DriverInfoVo;
import com.cyy.daijia.model.vo.driver.DriverLoginVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

@Slf4j
public class FaceFaceBack implements FallbackFactory<DriverInfoFeignClient> {
    @Override
    public DriverInfoFeignClient create(Throwable cause) {
        return new DriverInfoFeignClient() {
            @Override
            public Result<String> getDriverOpenId(Long driverId) {
                return null;
            }

            @Override
            public Result<Long> login(String code) {
                return null;
            }

            @Override
            public Result<DriverLoginVo> getDriverLoginInfo(Long driverId) {
                return null;
            }

            @Override
            public Result<Boolean> UpdateDriverAuthInfo(UpdateDriverAuthInfoForm updateDriverAuthInfoForm) {
                return null;
            }

            @Override
            public Result<DriverAuthInfoVo> getDriverAuthInfo(Long driverId) {
                return null;
            }

            @Override
            public Result<Boolean> creatDriverFaceModel(DriverFaceModelForm driverFaceModelForm) {
                return null;
            }

            @Override
            public Result<DriverSet> getDriverSet(Long driverId) {
                return null;
            }

            @Override
            public Result<Boolean> isFaceRecognition(Long driverId) {
                log.error("人脸识别失败",cause);
                throw new RuntimeException();
            }

            @Override
            public Result<Boolean> verifyDriverFace(DriverFaceModelForm driverFaceModelForm) {
                log.error("人脸识别失败",cause);
                throw new RuntimeException();
            }

            @Override
            public Result<Boolean> updateServiceStatus(Long driverId, Integer status) {
                return null;
            }

            @Override
            public Result<DriverInfoVo> getDriverInfo(Long driverId) {
                return null;
            }
        };
    }
}
